/*
 * @Author: duchengdong
 * @Date: 2021-10-12 16:44:35
 * @LastEditors: duchengdong
 * @LastEditTime: 2021-10-18 11:23:50
 * @Description:
 */
import { useAppSelector } from "../hooks";
import BookInfo from "../components/BookInfo";
import Navbar from "../components/Navbar";

const BookList = () => {
    const bookList = useAppSelector((state) => state.book.bookList);
    return (
        <div>
            <Navbar />
            <div>
                {bookList.map((book) => (
                    <BookInfo
                        key={book.id}
                        title={book.title}
                        author={book.author}
                        id={book.id}
                    />
                ))}
            </div>
        </div>
    );
};

export default BookList;
